{extend name="wmcommon/base" /}
{block name='top'}
<div class="top">
    <div class="top-row">
        <div class="logo"><img src="__STATIC__/wm_newindex/images/logo.jpg" /></div>
        <div id="nav" class="nav" style="max-height:none !important;">
            <ul>
                <li class="nav_z {if empty($pcate)}active{/if}">
                    <a href="/">首页</a>
                </li>
                
                {foreach $category as $v}
                <li class="nav_z {if isset($pcate) && $v.id==$pcate.id}active{/if}">
                    {php}$pid = $v['id']{/php}
                    <a href='{:url("/item/$pid")}'>{$v.name ?: ''}</a>
                    {notempty name='v.sub'}
                    <dl style="display:none;">
                        {foreach $v.sub as $vo}
                        {php}$id = $vo['id']{/php}
                        <dd><a href='{:url("/item/$pid-$id")}'>{$vo.name ?: ''}</a></dd>
                        {/foreach}
                    </dl>
                    {/notempty}
                </li>
                {/foreach}
            </ul>
        </div>
        <!--<div class="login"><a href="#"><b>登录</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">注册</a></div>-->
        <div class="search">
            <img src="__STATIC__/wm_index/images/wm/400.jpg">
        </div>
    </div>
</div>

<script>
    var navigation = responsiveNav("#nav");
</script>
<script>
    $(function(){

        if ( $(window).width() > 768) {

            $(".nav_z").hover(function(){
                var NavDlLeft = ($(this).width() - 110) / 2;
                $(this).find("dl").css("left",NavDlLeft);
                $(this).find("dl").fadeIn();

            },function(){
                $(this).find("dl").fadeOut();
            });
        } else {
            $(".nav_z").click(function(){
                $(this).find("dl").toggle();
            });
        };

    });
</script>

{/block}


{block name='footer'}
<div class="content">
    <div class="left">
        <ul>
            <!--<li><a href="http://www.wmyanxue.com/about.html">关于未名</a></li>
            <li><a href="http://www.wmyanxue.com/products.html">课程体系</a></li>
            <li><a href="http://www.wmyanxue.com/products/college.html">培训认证</a></li>
            <li><a href="http://www.wmyanxue.com/products/service.html">研学规划</a></li>
            <li><a href="http://www.wmyanxue.com/hezuo.html">合作机构</a></li>
            <li><a href="http://www.wmyanxue.com/faq.html">FAQ</a></li>
            <li><a href="http://www.wmyanxue.com/yixiang.html">提交意向</a></li>
            <li><a href="http://www.wmyanxue.com/about/contact.html">联系我们</a></li>-->
            <li><a href="http://www.wmyanxue.com/hezuo.html">产品服务</a></li>
            <li><a href="http://www.wmyanxue.com/products/college.html">未名学院</a></li>
            <li><a href="http://www.wmyanxue.com/about/fwbz.html">服务保障</a></li>
            <li><a href="http://www.wmyanxue.com/about/contact.html">关于我们</a></li>
        </ul>
        <p class="">
            <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802029646" style="display:inline-block;text-decoration:none;height:24px;line-height:24px; color:#777f8e;margin:12px 0px;"><img src="__STATIC__/wm_index/images/wm/beian.png" style="float:left;vertical-align:middle;"/>&nbsp;&nbsp;京公网安备 11010802029646号</a>
        </p>
        <p class="address">总部地址：北京市海淀区善缘街立方庭大厦</p>
    </div>
    <div class="right">
        <p class="qrcode image"><img src="__STATIC__/wm_index/images/wm/wechat.jpg" alt=""></p>
        <p class="txt">未名研学公众号二维码</p>
    </div>
</div>
{/block}

{block name='footerjs'}
<script src="__STATIC__/wm_index/js/wm/360.js"></script>
<script src="__STATIC__/wm_index/js/wm/idangerous.swiper.js"></script>
<script src="__STATIC__/wm_index/js/wm/isScroll.js"></script>
<script>
    $(function () {
        // 加载头部和底部
        //$("#header").load("header.html", function () {
        //    $("#header .index").addClass("on");
        //});
        //$("#footer").load("footer.html");
        // banner
        var banner = new Swiper('#banner', {
            autoplay: 5000, //可选选项，自动滑动
            loop: true, //可选选项，开启循环
            pagination: '.pagination',
            autoplayDisableOnInteraction: false,
        });
        // 跑马灯
        var silvertrack = new Swiper('#silvertrack', {
            autoplay: 1, //可选选项，自动滑动
            speed: 3000,
            loop: true, //可选选项，开启循环
            slidesPerView: "auto",
            loopedSlides: 3,
            autoplayDisableOnInteraction: false,
        });
        // 滚动动画
        $(".xScroll").xScroll();
        // 机构
        var institutions_list = new Swiper('#institutions_list', {
            slidesPerView: "auto",
        });
        // prev
        $("#institutions").on("click", ".btn_left", function () {
            institutions_list.swipePrev();
        });
        // next
        $("#institutions").on("click", ".btn_right", function () {
            institutions_list.swipeNext();
        });
        // 精品课程大搜索
        $("#search_course").on("click", ".tab .tab_item", function () {
            if (!$(this).hasClass("on")) {
                $(this).addClass("on").siblings(".tab_item").removeClass("on");
            }
        });
        $("#search_course").on("click", ".right .box span", function () {
            if (!$(this).hasClass("on")) {
                $(this).addClass("on").siblings("span").removeClass("on");
            }
        });
    })
</script>
{/block}